﻿@page
@model SourceStack.Pages.Aritcle.IndexModel
@{
    ViewData["Title"] = "文章列表";
}
<h1>文章列表</h1>
<p>@ViewData["Description"]</p>
@foreach (var item in Model.Aritcles)
{
    <div>
        <small>@item.PublishTime.ToString("yyyy年mm月dd日 hh点mm分")</small>
        <h2><a href="/Article/Single?id=@item.Id">@item.Title</a></h2>
        <p>@item.Body</p>
    </div>

}
@for (int i = 0; i < (Convert.ToInt32(@ViewData["Count"]) / 2) + (Convert.ToInt32(@ViewData["Count"]) % 2); i++)
{
    <a href="/Aritcle?pageIndex=@(i+1)">@(i+1) </a>
}